package com.sdsy.blockchaintrainingback.mapper.training;

import com.sdsy.blockchaintrainingback.enums.CommonStatusEnum;
import com.sdsy.blockchaintrainingback.mapper.BaseMapperX;
import com.sdsy.blockchaintrainingback.pojo.training.UserTraining;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface UserTrainingMapper extends BaseMapperX<UserTraining> {
    default UserTraining findActiveTrainingByUserId(Long userId){
        return selectOne(UserTraining::getUserId,userId,UserTraining::getStatus, CommonStatusEnum.ENABLE.getStatus());
    }
}
